/* GUI CONVERTED from rscup.p (converter v1.76) Thu Apr 25 19:01:18 2002 */
/* rscup.p - Release Management Supplier Schedules                            */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.6.1.5 $                                                       */
/*V8:ConvertMode=Report                                                       */
/* REVISION: 7.4    LAST MODIFIED: 10/01/93           BY: WUG *H148*          */
/* REVISION: 8.6E   LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane            */
/*                                 03/01/95           by: srk *H0BN*          */
/* REVISION: 8.6E   LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan           */
/* REVISION: 8.6E   LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan           */
/* REVISION: 9.1    LAST MODIFIED: 08/18/99   BY: *N01B* Mugdha Tambe         */
/* REVISION: 9.1    LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane     */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00   BY: *N0KP* Mark Brown           */
/* REVISION: 9.1    LAST MODIFIED: 09/11/00   BY: *N0RT* Mudit Mehta          */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.6.1.5 $   BY: Jean Miller        DATE: 04/16/02  ECO: *P05H*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* MASS CUM RESET */


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdtitle.i "b+ "}

/* PREPROCESSOR USED FOR REPORT'S WITH SIMULATION OPTION */
&SCOPED-DEFINE simulation true

define new shared variable  supplier_from like po_vend.
define new shared variable  supplier_to like po_vend.
define new shared variable  shipto_from like po_ship.
define new shared variable  shipto_to like po_ship.
define new shared variable  part_from like pod_part.
define new shared variable  part_to like pod_part.
define new shared variable  po_from like po_nbr.
define new shared variable  po_to like po_nbr.
define new shared variable  buyer_from like po_buyer.
define new shared variable  buyer_to like po_buyer.

define new shared variable  update_yn like mfc_logical label "Update".
define new shared variable  cum_ship_start_dt as date
   label "Cum Shipped Start Date".
define new shared variable  Remarks    as character format "x(24)"
   label "Remarks".
define new shared variable  sortoption as integer
   label "Sort Option" format "9" initial 1.

define new shared variable  sortextoption as character extent 3 format "x(34)".
define variable  schtype as integer initial 1.

sortextoption[1] = "1 - " + getTermLabel("BY",2) + " " +
                   getTermLabel("SHIP-TO",7) + ", " +
                   getTermLabel("SUPPLIER",8) + ", " +
                   getTermLabel("ITEM",4) + ", " +
                   getTermLabel("PURCHASE_ORDER",2).
                   sortextoption[2] = "2 - " + getTermLabel("BY",2) + " " +
                   getTermLabel("ITEM",4) + ", " +
                   getTermLabel("SHIP-TO",7) + ", " +
                   getTermLabel("SUPPLIER",8) + ", " +
                   getTermLabel("PURCHASE_ORDER",2).
                   sortextoption[3] = "3 - " + getTermLabel("BY",2) + " " +
                   getTermLabel("PURCHASE_ORDER",2) + ", " +
                   getTermLabel("ITEM",4).


/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
   
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
po_from              colon 20
   po_to                colon 50 label "To"
   part_from            colon 20
   part_to              colon 50 label "To"
   supplier_from        colon 20
   supplier_to          colon 50 label "To"
   shipto_from          colon 20
   shipto_to            colon 50 label "To"
   buyer_from           colon 20
   buyer_to             colon 50 label "To"
   skip(1)
   update_yn            colon 35
   cum_ship_start_dt    colon 35
   remarks              colon 35
   skip(1)
   sortoption           colon 30
   sortextoption[1]     at 40 no-label
   sortextoption[2]     at 40 no-label
   sortextoption[3]     at 40 no-label
   skip(1)
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

cum_ship_start_dt = today.

repeat:

   display
      sortextoption
   with frame a.

   if po_to = hi_char then po_to = "".
   if part_to = hi_char then part_to = "".
   if supplier_to = hi_char then supplier_to = "".
   if shipto_to = hi_char then shipto_to = "".
   if buyer_to = hi_char then buyer_to = "".

   update
      po_from
      po_to
      part_from
      part_to
      supplier_from
      supplier_to
      shipto_from
      shipto_to
      buyer_from
      buyer_to
      update_yn
      cum_ship_start_dt
      Remarks
      sortoption
   with frame a.

   bcdparm = "".
   {mfquoter.i po_from     }
   {mfquoter.i po_to       }
   {mfquoter.i part_from   }
   {mfquoter.i part_to     }
   {mfquoter.i supplier_from}
   {mfquoter.i supplier_to }
   {mfquoter.i shipto_from }
   {mfquoter.i shipto_to   }
   {mfquoter.i buyer_from  }
   {mfquoter.i buyer_to    }
   {mfquoter.i update_yn   }
   {mfquoter.i cum_ship_start_dt}
   {mfquoter.i Remarks     }
   {mfquoter.i sortoption  }

   if po_to = "" then po_to = hi_char.
   if part_to = "" then part_to = hi_char.
   if supplier_to = "" then supplier_to = hi_char.
   if shipto_to = "" then shipto_to = hi_char.
   if buyer_to = "" then buyer_to = hi_char.

   /* OUTPUT DESTINATION SELECTION */
   {gpselout.i &printType = "printer"
               &printWidth = 132
               &pagedFlag = " "
               &stream = " "
               &appendToFile = " "
               &streamedOutputToTerminal = " "
               &withBatchOption = "yes"
               &displayStatementType = 1
               &withCancelMessage = "yes"
               &pageBottomMargin = 6
               &withEmail = "yes"
               &withWinprint = "yes"
               &defineVariables = "yes"}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.

   {mfphead2.i}

   if sortoption = 1 then do:
      {gprun.i ""rscupa.p""}
   end.
   else
   if sortoption = 2 then do:
      {gprun.i ""rscupb.p""}
   end.
   else
   if sortoption = 3 then do:
      {gprun.i ""rscupc.p""}
   end.

   {mfrtrail.i}
end.
